<%-- 
    Document   : index
    Created on : Jun 7, 2012, 10:00:13 PM
    Author     : Saji
--%>

<%@page import="java.io.*"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>

<c:if test="${empty username}">
    <jsp:forward page="loginPage.jsp"/>
</c:if>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Photo Gallery</title>
        <link href="css/styles-1.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/viewAlbums.js"></script>
        <script type="text/javascript">
            
        </script>
    </head>
    <body onload="load()">
        <font color="blue">Welcome,<b> ${sessionScope.username}</b></font>
        <div id="header">
            <h1>My Photo Gallery</h1>
        </div>
        <div class="clear"></div>
        <div id="header-bottom">
            <a href="javascript:createNewAlbum()">New Album</a> | Search albums:
            <input type="text" name="searchBox" id="searchBox" onKeyUp="displayResult()"/>
        </div>
        <div class="clear border"></div>
        <div id="main">
            <div id="main-left">
                <div id="main-left-inner">
                    <c:import url="WEB-INF/albums.xml" var="xml"/>
                    <c:import url="WEB-INF/viewAlbums.xsl" var="xslt"/>
                    <x:transform xml="${xml}" xslt="${xslt}">
                        <x:param name="searchText" value="" />
                    </x:transform>
                </div>
            </div>
            <div id="main-right">
                <a href="DefaultController?action=view_all_album" style="margin: 20px;"><img src="images/refresh.png" width="70px"/></a>
            </div>
            <div class="clear border"></div>
        </div>
    </body>
</html>
